#ifndef SQ_ZZ_PEXFACTORING
#define SQ_ZZ_PEXFACTORING


// include the NTL library, visit http://www.shoup.net/ntl/
#include <NTL/ZZ_pXFactoring.h>
#include <NTL/ZZ_pEX.h>
#include <NTL/ZZ_pEX.h>
#include <NTL/mat_ZZ_pE.h>
#include <NTL/mat_ZZ_p.h>
#include "SQ_ring.h"

NTL_CLIENT

ZZ_pEX	SQ_eval(const ZZ_pEX& f,const ZZ_pX& g,const ZZ_pEX& b);
vec_ZZ_p solve_equ_GF2(mat_ZZ_pE A,int* leading_ones_pos);
int* reduced_row_echelon(mat_ZZ_pE& A,int p,int order);
int SQ_CompleteFactorization(const ZZ_pEX& ,vec_ZZ_pEX& );
int SQ_Giesbretch_fac(const ZZ_pEX& ,int ,int ,ZZ_pEX& ,ZZ_pEX&,int LOG_PRINT=0 );
long MYgenerate_GF4(vec_ZZ_pE& element);

int int_decomposition(int* ,int* ,int ,int ,int*& );
int SQ_Giesbretch_BiFac(const ZZ_pEX& ,long ,ZZ_pEX& ,ZZ_pEX& );
int SQ_min_central_left_multiple(const ZZ_pEX&,ZZ_pX& , ZZ_pEX& );

#endif
